gtk4.git
5 years agomessagedialog: Don't initialize twice
Matthias Clasen [Thu, 4 Feb 2021 05:25:36 +0000 (00:25 -0500)]
messagedialog: Don't initialize twice

We don't need to set these fields more than once.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agocomposetable: Remove a redundant check
Matthias Clasen [Thu, 4 Feb 2021 05:22:52 +0000 (00:22 -0500)]
composetable: Remove a redundant check

We already know seq_index is not NULL here.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agox11: A case of argument order confusion
Matthias Clasen [Thu, 4 Feb 2021 05:20:26 +0000 (00:20 -0500)]
x11: A case of argument order confusion

translate_keysym was expecting its arguments the
other way around.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agotextbtree: Avoid line vs char count confusion
Matthias Clasen [Thu, 4 Feb 2021 05:17:55 +0000 (00:17 -0500)]
textbtree: Avoid line vs char count confusion

The post_insert_fixup helper function was confused about
its argument order.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agolistbase: Don't specify the same thing twice
Matthias Clasen [Thu, 4 Feb 2021 05:13:53 +0000 (00:13 -0500)]
listbase: Don't specify the same thing twice

We only need to set EXPLICIT_NOTIFY once.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agocss: Fix border value parsing
Matthias Clasen [Thu, 4 Feb 2021 05:11:42 +0000 (00:11 -0500)]
css: Fix border value parsing

This function was not resetting computed as it meant
to because the last loop was never executed.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agovulkan: Fix image uploading by regions
Matthias Clasen [Thu, 4 Feb 2021 05:09:09 +0000 (00:09 -0500)]
vulkan: Fix image uploading by regions

This code did not make sense; it was incrementing
the wrong variable.

Pointed out in https://www.viva64.com/en/b/0793/

5 years agoMerge branch 'wip/jimmac/colored-list-image-buttons' into 'master'
Matthias Clasen [Thu, 4 Feb 2021 01:38:47 +0000 (01:38 +0000)]
Merge branch 'wip/jimmac/colored-list-image-buttons' into 'master'

Adwaita: allow suggested and destructive action buttons in lists

Closes #3643

See merge request GNOME/gtk!3153

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Thu, 4 Feb 2021 01:38:09 +0000 (01:38 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Graphene is a dependency of Gsk, not Gdk

See merge request GNOME/gtk!3149

5 years agoAdwaita: allow suggested and destructive action buttons in lists
Jakub Steiner [Wed, 3 Feb 2021 22:13:24 +0000 (23:13 +0100)]
Adwaita: allow suggested and destructive action buttons in lists

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3643

5 years agoMerge branch 'x11-dnd-fix' into 'master'
Matthias Clasen [Wed, 3 Feb 2021 20:11:33 +0000 (20:11 +0000)]
Merge branch 'x11-dnd-fix' into 'master'

x11: Handle X-specific targets in drops

Closes #3642

See merge request GNOME/gtk!3151

5 years agox11: Handle X-specific targets in drops
Matthias Clasen [Wed, 3 Feb 2021 19:16:01 +0000 (14:16 -0500)]
x11: Handle X-specific targets in drops

This code is very similar to the handling for these
targets in the clipboard case.

Fixes: #3642
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 3 Feb 2021 15:17:34 +0000 (15:17 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!3150

5 years agoGraphene is a dependency of Gsk, not Gdk
Emmanuele Bassi [Wed, 3 Feb 2021 14:05:27 +0000 (14:05 +0000)]
Graphene is a dependency of Gsk, not Gdk

So let's put it in the right place when building the introspection data.

5 years agoLink the data url tests statically
Matthias Clasen [Wed, 3 Feb 2021 14:02:06 +0000 (09:02 -0500)]
Link the data url tests statically

Thats the cleaner way to test internal apis.

5 years agoAdd tests for css value transitions
Matthias Clasen [Wed, 3 Feb 2021 13:56:57 +0000 (08:56 -0500)]
Add tests for css value transitions

Just a few cases for now, enough to test a recently
fixed regression with shadow transitions.

5 years agoMerge branch 'uac.meson.master' into 'master'
Chun-wei Fan [Wed, 3 Feb 2021 02:16:58 +0000 (02:16 +0000)]
Merge branch 'uac.meson.master' into 'master'

gtk4-update-icon-cache: Avoid UAC on 32-bit Windows

Closes #3632

See merge request GNOME/gtk!3141

5 years agogtk4-update-icon-cache: Avoid UAC on 32-bit Windows
Chun-wei Fan [Wed, 3 Feb 2021 02:16:58 +0000 (02:16 +0000)]
gtk4-update-icon-cache: Avoid UAC on 32-bit Windows

As the program executable name has 'update' in its filename,
gtk4-update-icon-cache.exe is considered to be an installer program on 32-bit
Windows [1], which will cause the program to fail to run unless it is running
with elevated privileges (i.e. UAC).

Avoid this situation by embedding a manifest file into the final executable
that tells Windows that this is not a program that requires elevation.

Fixes issue #3632.

[1]: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc709628(v=ws.10)?redirectedfrom=MSDN,
     under section "Installer Detection  Technology"

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Wed, 3 Feb 2021 00:43:44 +0000 (00:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

css: Allow transitioning different-size shadows

See merge request GNOME/gtk!3145

5 years agocss: Allow transitioning different-size shadows
Matthias Clasen [Tue, 2 Feb 2021 20:22:32 +0000 (15:22 -0500)]
css: Allow transitioning different-size shadows

The code handles it just fine. The length check was
an erronous addition.

5 years agoMerge branch 'im-context-work' into 'master'
Matthias Clasen [Tue, 2 Feb 2021 17:29:14 +0000 (17:29 +0000)]
Merge branch 'im-context-work' into 'master'

Some im context work

Closes #1004, #186, and #3521

See merge request GNOME/gtk!3143

5 years agocomposetable: Parse hex escapes too
Matthias Clasen [Tue, 2 Feb 2021 17:00:51 +0000 (12:00 -0500)]
composetable: Parse hex escapes too

This was a small omission from the Compose file
syntax that doesn't cost us much to support.

Add a test for this syntax too.

Fixes: #1004
5 years agoAdd tests for string values
Matthias Clasen [Tue, 2 Feb 2021 16:53:24 +0000 (11:53 -0500)]
Add tests for string values

Add a test that checks we parse values with
multiple characters correctly.

5 years agocomposetable: Support string values in the cache
Matthias Clasen [Tue, 2 Feb 2021 06:42:08 +0000 (01:42 -0500)]
composetable: Support string values in the cache

Change the cache format to include the character
data that we need to hold string values in the table.

5 years agocomposetable: Don't use GSlice for big blobs
Matthias Clasen [Tue, 2 Feb 2021 06:15:00 +0000 (01:15 -0500)]
composetable: Don't use GSlice for big blobs

This just doesn't make sense. This will use malloc
anyway, so just call malloc directly.

5 years agocomposetable: Keep multi-char values
Matthias Clasen [Tue, 2 Feb 2021 06:09:54 +0000 (01:09 -0500)]
composetable: Keep multi-char values

Keep string values in the table, and return them
from the check function. This commit temporarily
disables the table caching, since the cache format
does not handle string values yet.

Fixes: #186
5 years agoMerge branch 'wip/silence-bounds-warnings' into 'master'
Matthias Clasen [Tue, 2 Feb 2021 16:38:20 +0000 (16:38 +0000)]
Merge branch 'wip/silence-bounds-warnings' into 'master'

gdk/toplevelsize: Remove warnings about exceeding bounds

Closes #3035

See merge request GNOME/gtk!3142

5 years agocomposetable: Parse multi-char values
Matthias Clasen [Tue, 2 Feb 2021 05:21:11 +0000 (00:21 -0500)]
composetable: Parse multi-char values

Rewrite the value parsing function to accept strings
that hold more than a single Unicode character.

5 years agocomposetable: Another step towards multi-char values
Matthias Clasen [Tue, 2 Feb 2021 04:58:18 +0000 (23:58 -0500)]
composetable: Another step towards multi-char values

Change the parser data structures to hold a string, rather
than a gunichar. We still only put a single Unicode character
into it, currently.

5 years agocomposetable: Prepare for multi character values
Matthias Clasen [Tue, 2 Feb 2021 04:37:05 +0000 (23:37 -0500)]
composetable: Prepare for multi character values

Make it possible for gtk_compose_table_check to return
a string instead of just a single Unicode character.
Currently, we only ever return strings holding a single
character, still.

5 years agoimcontext: Prepare for multi-char values
Matthias Clasen [Tue, 2 Feb 2021 04:37:22 +0000 (23:37 -0500)]
imcontext: Prepare for multi-char values

Reshuffle things so we can easily handle values
that are strings instead of just single Unicode
characters.

5 years agocomposetable: Check algorithmic matching
Matthias Clasen [Tue, 2 Feb 2021 02:52:42 +0000 (21:52 -0500)]
composetable: Check algorithmic matching

Just some spot checks, enough to verify the
fix in the previous commit.

5 years agocomposetable: Fix algorithmic matching
Matthias Clasen [Tue, 2 Feb 2021 02:51:51 +0000 (21:51 -0500)]
composetable: Fix algorithmic matching

The code wasn't paying attention to (lack of) nul-termination
in one place, causing it to not match when it should.

5 years agocomposetable: Add tests for compact table matching
Matthias Clasen [Tue, 2 Feb 2021 02:10:44 +0000 (21:10 -0500)]
composetable: Add tests for compact table matching

Not very exhaustive, just some spot checks.

5 years agoimcontext: Code cleanup
Matthias Clasen [Tue, 2 Feb 2021 01:41:45 +0000 (20:41 -0500)]
imcontext: Code cleanup

Get rid of auxiliary check_table function.

5 years agoimcontext: Move code around
Matthias Clasen [Tue, 2 Feb 2021 01:27:38 +0000 (20:27 -0500)]
imcontext: Move code around

Move all the checking code to gtkcomposetable.c, and
add api that we can use in tests.

5 years agocomposetable: Add tests for matching
Matthias Clasen [Tue, 2 Feb 2021 00:55:56 +0000 (19:55 -0500)]
composetable: Add tests for matching

This tests the api we use to match key sequences
against compose tables.

5 years agoimcontext: Use gtk_compose_table_check
Matthias Clasen [Tue, 2 Feb 2021 00:41:07 +0000 (19:41 -0500)]
imcontext: Use gtk_compose_table_check

Use the just-introduced api.

5 years agocomposetable: Add api to check tables
Matthias Clasen [Tue, 2 Feb 2021 00:40:22 +0000 (19:40 -0500)]
composetable: Add api to check tables

This copies the check_table code from gtkimcontextsimple.c,
in order to have an api for tests.

5 years agoAdd tests for GtkComposeTable
Matthias Clasen [Mon, 1 Feb 2021 20:48:06 +0000 (15:48 -0500)]
Add tests for GtkComposeTable

Add some tests for the code that parses Compose files.

This tests the fix in the previous commit.

5 years agocomposetable: Drop table debug code
Matthias Clasen [Mon, 1 Feb 2021 23:50:20 +0000 (18:50 -0500)]
composetable: Drop table debug code

This is better off in the tests that we are going to add.

5 years agocomposetable: Parser fixes
Matthias Clasen [Mon, 1 Feb 2021 20:48:43 +0000 (15:48 -0500)]
composetable: Parser fixes

We were not handling octal escapes right.

5 years agoimcontext: Drop GTK_MAX_COMPOSE_LEN
Matthias Clasen [Mon, 1 Feb 2021 17:28:40 +0000 (12:28 -0500)]
imcontext: Drop GTK_MAX_COMPOSE_LEN

Drop GTK_MAX_COMPOSE_LEN from docs. It is no longer
used by GTK at all.  We leave the define in place
for now, to avoid breaking 3rd party code that might
use it.

5 years agocomposetable: Warn when ignoring things
Matthias Clasen [Mon, 1 Feb 2021 17:21:06 +0000 (12:21 -0500)]
composetable: Warn when ignoring things

We should at least give a hint that we've seen the line,
otherwise people will wonder why nothing happened.

5 years agocomposetable: parse long sequences
Matthias Clasen [Mon, 1 Feb 2021 17:07:24 +0000 (12:07 -0500)]
composetable: parse long sequences

Allow compose sequences of up to 20 code points.

Fixes: #3521
5 years agocomposetable: Fix an off-by-one
Matthias Clasen [Mon, 1 Feb 2021 13:40:31 +0000 (08:40 -0500)]
composetable: Fix an off-by-one

Fix an off-by-one in the code parsing octal escapes
in compose files.

5 years agoimcontext: Stop using GTK_MAX_COMPOSE_LEN
Matthias Clasen [Mon, 1 Feb 2021 13:39:42 +0000 (08:39 -0500)]
imcontext: Stop using GTK_MAX_COMPOSE_LEN

Allocate the compose_buffer, and resize it when needed
to match the tables we use.

5 years agoimcontext: Code cleanup
Matthias Clasen [Mon, 1 Feb 2021 17:08:38 +0000 (12:08 -0500)]
imcontext: Code cleanup

Use g_clear_pointer instead of opencoding it in
multiple places.

5 years agogdk/toplevelsize: Remove warnings about exceeding bounds
Jonas Ådahl [Mon, 1 Feb 2021 10:31:11 +0000 (11:31 +0100)]
gdk/toplevelsize: Remove warnings about exceeding bounds

Sometimes the size will exceed the minimum bounds. For example crazy
applications like the widget factory that contains the world, or when a
user interactively resizes a window to be larger than the monitor the
window is on is.

The former is questionable, but the latter is not, and from here we
can't really see the difference, so just stop complaining.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3035
5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 1 Feb 2021 06:20:40 +0000 (06:20 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #2319

See merge request GNOME/gtk!3140

5 years agoimcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
Matthias Clasen [Mon, 1 Feb 2021 05:55:25 +0000 (00:55 -0500)]
imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN

There was an off-by-one error, making us reject sequences
of this length. But the rest of the code handles them
just fine.

Fixes: #2319
5 years agoimcontext: Improve an error message
Matthias Clasen [Mon, 1 Feb 2021 05:44:08 +0000 (00:44 -0500)]
imcontext: Improve an error message

This error message was misleading, as pointed out
by Ralf Jung.

5 years agoimcontext: Add a precondition check
Matthias Clasen [Mon, 1 Feb 2021 05:43:44 +0000 (00:43 -0500)]
imcontext: Add a precondition check

5 years agoimcontext: Show preedit for compose sequences
Matthias Clasen [Mon, 1 Feb 2021 05:37:43 +0000 (00:37 -0500)]
imcontext: Show preedit for compose sequences

Show the sequences as they are entered, using ⎄ for
the compose key, to match what IBus does nowadays.
Also handle backspace to allow corrections.

5 years agoimcontext: Update our check for dead keys
Matthias Clasen [Mon, 1 Feb 2021 01:55:29 +0000 (20:55 -0500)]
imcontext: Update our check for dead keys

A bunch of keysyms for dead keys have been added since this
code was last touched. Update the check to cover the full
range from dead_grave to dead_greek.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Mon, 1 Feb 2021 01:48:47 +0000 (01:48 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!3139

5 years agoMerge branch 'wip/exalm/consumes-motion' into 'master'
Matthias Clasen [Mon, 1 Feb 2021 01:34:45 +0000 (01:34 +0000)]
Merge branch 'wip/exalm/consumes-motion' into 'master'

Drag fixes and cleanups

Closes #3513

See merge request GNOME/gtk!3001

5 years agoRemove a forgotten file
Matthias Clasen [Fri, 29 Jan 2021 15:45:27 +0000 (10:45 -0500)]
Remove a forgotten file

The example series only has 9 steps now. Remove remnants
of step 10.

5 years agonativedialog: Add more docs
Matthias Clasen [Mon, 1 Feb 2021 01:22:59 +0000 (20:22 -0500)]
nativedialog: Add more docs

Emphasize that native dialogs aren't widgets, and are not
kept alive by GTK.

5 years agoMerge branch 'tool-static' into 'master'
Matthias Clasen [Mon, 1 Feb 2021 00:44:08 +0000 (00:44 +0000)]
Merge branch 'tool-static' into 'master'

tools: Don't static and dynamic link on libgtk4

See merge request GNOME/gtk!3138

5 years agoMerge branch 'wip/exalm/activate' into 'master'
Matthias Clasen [Mon, 1 Feb 2021 00:32:05 +0000 (00:32 +0000)]
Merge branch 'wip/exalm/activate' into 'master'

listitemwidget: Activate on release instead of press

Closes #3345

See merge request GNOME/gtk!3008

5 years agotools: Don't static and dynamic link on libgtk4
Xavier Claessens [Sun, 31 Jan 2021 16:03:16 +0000 (11:03 -0500)]
tools: Don't static and dynamic link on libgtk4

5 years ago4.1.0
Matthias Clasen [Sat, 30 Jan 2021 03:28:28 +0000 (22:28 -0500)]
4.1.0

5 years agotests: Disable the textview-margins reftest
Matthias Clasen [Sat, 30 Jan 2021 03:45:21 +0000 (22:45 -0500)]
tests: Disable the textview-margins reftest

It is too flaky to be useful.

5 years agonode editor: Add a dark mode toggle
Matthias Clasen [Sun, 31 Jan 2021 00:28:02 +0000 (19:28 -0500)]
node editor: Add a dark mode toggle

This is useful to see light rendering clearly.

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Sat, 30 Jan 2021 19:15:43 +0000 (19:15 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit 056c3e11a148ff72638afac0e4e9511a11d9987b)

5 years agoMerge branch 'mcclurgm-master-patch-63249' into 'master'
Timm Bäder [Sat, 30 Jan 2021 17:58:33 +0000 (17:58 +0000)]
Merge branch 'mcclurgm-master-patch-63249' into 'master'

Document nullability of gtk_list_box_get_selected_row

See merge request GNOME/gtk!3137

5 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Sat, 30 Jan 2021 16:00:24 +0000 (16:00 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit f224c8fab9c1d26e5a09e581b1de9d13fead6d74)

5 years agoDocument nullability of gtk_list_box_get_selected_row
Michael McClurg [Sat, 30 Jan 2021 15:23:41 +0000 (15:23 +0000)]
Document nullability of gtk_list_box_get_selected_row

5 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 30 Jan 2021 13:21:32 +0000 (14:21 +0100)]
Update POTFILES.in

5 years agoMerge branch 'fix-unfocus-on-unmap' into 'master'
Matthias Clasen [Sat, 30 Jan 2021 03:25:19 +0000 (03:25 +0000)]
Merge branch 'fix-unfocus-on-unmap' into 'master'

Fix unsetting focus

Closes #3623

See merge request GNOME/gtk!3136

5 years agoFix unsetting focus
Matthias Clasen [Sat, 30 Jan 2021 02:41:16 +0000 (21:41 -0500)]
Fix unsetting focus

Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.

Fixes: #3623
5 years agoMerge branch 'msvc.nounistd' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 20:16:13 +0000 (20:16 +0000)]
Merge branch 'msvc.nounistd' into 'master'

testsuite/testutils.c: Fix build on Visual Studio

See merge request GNOME/gtk!3131

5 years agoMerge branch 'gst-vaapi-fix' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 19:06:03 +0000 (19:06 +0000)]
Merge branch 'gst-vaapi-fix' into 'master'

gtkgstsink: Sync texture before handing it to GDK

See merge request GNOME/gtk!3114

5 years agoMerge branch 'ci-gstreamer-deps' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 19:05:47 +0000 (19:05 +0000)]
Merge branch 'ci-gstreamer-deps' into 'master'

Ci gstreamer deps

See merge request GNOME/gtk!3133

5 years agoMerge branch 'ebassi/for-master' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 18:47:31 +0000 (18:47 +0000)]
Merge branch 'ebassi/for-master' into 'master'

Ebassi/for master

See merge request GNOME/gtk!3134

5 years agogtkgstsink: Sync texture before handing it to GDK
Jan Alexander Steffens (heftig) [Mon, 25 Jan 2021 21:43:11 +0000 (22:43 +0100)]
gtkgstsink: Sync texture before handing it to GDK

We need to synchronize when moving the texture between contexts, or we
get glitches with VA-API decoding.

5 years agoci: Add mesa-libGLES-devel
Matthias Clasen [Fri, 29 Jan 2021 17:49:20 +0000 (12:49 -0500)]
ci: Add mesa-libGLES-devel

Try again, since libglvnd-devel is not the right choice.

5 years agobuild: Disable subproject Cairo tests
Emmanuele Bassi [Fri, 29 Jan 2021 16:30:19 +0000 (16:30 +0000)]
build: Disable subproject Cairo tests

There's really no point in running them.

5 years agodocs: Annotate XML fragments as such
Emmanuele Bassi [Thu, 28 Jan 2021 15:42:22 +0000 (15:42 +0000)]
docs: Annotate XML fragments as such

This way we can get syntax highlighting.

5 years agodocs: Escape bare tags
Emmanuele Bassi [Thu, 28 Jan 2021 14:54:10 +0000 (14:54 +0000)]
docs: Escape bare tags

Otherwise tools processing the description of GtkWidget will be *very*
confused.

5 years agodocs: Use the appropriate syntax for code block language
Emmanuele Bassi [Thu, 28 Jan 2021 14:53:39 +0000 (14:53 +0000)]
docs: Use the appropriate syntax for code block language

5 years agodocs: Remove stray code block end marker
Emmanuele Bassi [Thu, 28 Jan 2021 14:53:25 +0000 (14:53 +0000)]
docs: Remove stray code block end marker

5 years agoMerge branch 'gtk-surface-release-4' into 'master'
Jonas Ådahl [Fri, 29 Jan 2021 16:21:05 +0000 (16:21 +0000)]
Merge branch 'gtk-surface-release-4' into 'master'

wayland: Signal gtk-shell surface destruction to the server

See merge request GNOME/gtk!3129

5 years agoci: Use v26 of the Fedora image
Matthias Clasen [Fri, 29 Jan 2021 16:14:54 +0000 (11:14 -0500)]
ci: Use v26 of the Fedora image

This includes libglvnd-devel and should fix using the
gstreamer gl support.

5 years agoci: Add libglvnd-devel to images
Matthias Clasen [Fri, 29 Jan 2021 16:04:38 +0000 (11:04 -0500)]
ci: Add libglvnd-devel to images

gstreamers gl support included headers from this
package without depending on it. Work around this
packaging error by explicitly adding the needed
dependencies.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 15:15:43 +0000 (15:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

Closes #3615

See merge request GNOME/gtk!3132

5 years agotestsuite/testutils.c: Fix build on Visual Studio
Chun-wei Fan [Fri, 29 Jan 2021 09:52:54 +0000 (17:52 +0800)]
testsuite/testutils.c: Fix build on Visual Studio

Visual Studio does not come with unistd.h, but Windows do have write() and
close() in io.h, so include io.h instead of unistd.h on Windows.

For MinGW, unistd.h in turn includes io.h.

5 years agogl renderer: Fix viewport computation when rendering offscreen
Timm Bäder [Fri, 29 Jan 2021 08:43:44 +0000 (09:43 +0100)]
gl renderer: Fix viewport computation when rendering offscreen

Fixes #3615

5 years agoshowrendernode: Monitor input file
Timm Bäder [Fri, 29 Jan 2021 08:05:03 +0000 (09:05 +0100)]
showrendernode: Monitor input file

5 years agonode editor: Show some default node data
Timm Bäder [Thu, 28 Jan 2021 15:40:11 +0000 (16:40 +0100)]
node editor: Show some default node data

Show case the icon and the render node format this way.

5 years agoshader builder: Improve error output
Timm Bäder [Thu, 28 Jan 2021 11:31:18 +0000 (12:31 +0100)]
shader builder: Improve error output

5 years agonode editor: Make help textview monospace
Timm Bäder [Sun, 24 Jan 2021 04:27:07 +0000 (05:27 +0100)]
node editor: Make help textview monospace

Otherwise the nice markdown tables don't line up.

5 years agowindowhandle: Use drag threshold instead of double click threshold
Alexander Mikhaylenko [Fri, 25 Dec 2020 17:58:06 +0000 (22:58 +0500)]
windowhandle: Use drag threshold instead of double click threshold

Now that we have gtk_drag_check_threshold_double(), be consistent with
other draggable widgets and make sure we don't take over a drag before a
child does.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3513

5 years agodragsource: Use double coordinates for checking drag threshold
Alexander Mikhaylenko [Fri, 25 Dec 2020 17:57:48 +0000 (22:57 +0500)]
dragsource: Use double coordinates for checking drag threshold

If multiple nested widgets have drag sources on them, both using bubble
phase, we need to reliably pick the inner one. Both of them will try to
start dragging, and we need to make sure there are no situations where the
outer widget starts drag earlier and cancels the inner one.

Currently, this can easily happen via integer rounding: start and current
coordinates passed into gtk_drag_check_threshold() are initially doubles
(other than in GtkNotebook and GtkIconView), and are casted to ints. Then
those rounded values are used to calculate deltas to compare to the drag
threshold, losing quite a lot of precision along the way, and often
resulting in the outer widget getting larger deltas.

To avoid it, just don't round it. Introduce a variant of the function that
operates on doubles: gtk_drag_check_threshold_double() and use it instead
of the original everywhere.

5 years agoentry: Fix drag threshold check
Alexander Mikhaylenko [Tue, 19 Jan 2021 08:00:02 +0000 (13:00 +0500)]
entry: Fix drag threshold check

It was passing offsets as current oordinates.

5 years agowindowhandle: Don't drag on capture phase
Alexander Mikhaylenko [Fri, 25 Dec 2020 07:35:57 +0000 (12:35 +0500)]
windowhandle: Don't drag on capture phase

This was needed to work around widgets claiming event sequences on press,
by ignoring them and starting the drag anyway unless they have certain
event controllers on them.

The most visible offender was GtkButton, but since the last commit it
doesn't claim the sequence anymore and we can remove the hack.

5 years agocheckbutton: Claim sequence on release instead of press
Alexander Mikhaylenko [Fri, 25 Dec 2020 10:59:38 +0000 (15:59 +0500)]
checkbutton: Claim sequence on release instead of press

Make it possible to drag windows from check buttons in future.

5 years agobutton: Stop claiming event sequence on press
Alexander Mikhaylenko [Fri, 25 Dec 2020 07:30:33 +0000 (12:30 +0500)]
button: Stop claiming event sequence on press

Currently GtkButton claims the sequence both on press and on release. Stop
claiming it on press and only do it on release, allowing drags to start
from it.

This will allow to remove a hack from GtkWindowHandle.

5 years agoMerge branch 'pango-glyph-positions' into 'master'
Matthias Clasen [Fri, 29 Jan 2021 01:41:56 +0000 (01:41 +0000)]
Merge branch 'pango-glyph-positions' into 'master'

Tell pango not to round glyph positions

See merge request GNOME/gtk!2058